package initialize

import (
	"context"
	"fmt"
	"go.uber.org/zap"
	"go.uber.org/zap/exp/zapslog"
	"log/slog"
)

type Password string

func (p Password) LogValue() slog.Value {
	return slog.StringValue("REDACTED")
}

func Zap() {
	logger := zap.NewExample(zap.IncreaseLevel(zap.InfoLevel))
	defer logger.Sync()

	sl := slog.New(zapslog.NewHandler(logger.Core()))
	ctx := context.Background()

	sl.LogAttrs(ctx, slog.LevelDebug, "not show up")

	fmt.Println("zap初始化成功")

}
